;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; google-code-mode.el -- Major mode for interacting with Google Code projects
;; Copyright (C) 2012, Patrick M. Niedzielski.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Author: Patrick M. Niedzielski <PatrickNiedzielski@gmail.com>
;; Version: 0.1
;; Homepage: https://code.google.com/p/google-code-mode-el/
;;
;; Please submit any bugs to the bug tracker at
;; <https://code.google.com/p/google-code-mode-el/issues/>


(require 'url)
(require 'url-http)


(defconst google-code-mode-version "0.1")
(defconst google-code-mode-name "google-code-mode")

(defun google-code-mode-version ()
  "Display the version of google-code-mode."
  (interactive)
  (let ((version (format "%s-%s"
                         google-code-mode-name
                         google-code-mode-version)))
    (if (interactive-p)
        (message "%s" version)
      version)))



(defvar google-code-buffer "*google-code*")
(defun google-code-buffer (&optional section)
  "Create a buffer representing a Google Code Project.
SECTION is not used at the moment."
  (get-buffer-create google-code-buffer))



(defun google-code-mode-authenticate-source-string ()
  "Returns the source string to send via the Google API.
This takes the form of `companyName-applicationName-versionID',
with `companyName' being `gnuemacs', `applicationName' being
`googlecodemode', and `versionID' being the current version of
google-code-mode."
  (format "gnuemacs-googlecodemode-%s" google-code-mode-version))